import request from "../uitls/request";

//请求的地址
// axios.get/post
// request.get()

// 获取banner ==》 轮播图
const getBanner = () => {
  return request.get('/api/tab' + "/1")
}
// 获取首页的数据 
const getItems = (params = {}) => {
  return request.get('/api/column/baokuan', params)
}
// 获取详情页的数据 
const getDetail = (id) => {
  return request.get('/api/detail', {
    params: {
      id
    }
  })
}
// 获取分类页的数据 
const getCateItems = () => {
  return request.get('/api/tabs')
}
// 获取每一个分类下的数据 
const getCateItemList = (id) => {
  return request.get('/api/tab/' + id);
  }

export {
  getBanner,
  getItems,
  getDetail,
  getCateItems,
  getCateItemList
}